package com.globallogic.vkulyk.JaxbHandler;

import com.sun.tools.internal.xjc.Driver;

public class BindingsGenerator {
	private String packDir = "";
	private String packName = "";
	private String xsdFile = "";

	public BindingsGenerator(String packDir, String packName, String xsdFile) {
		this.packDir = packDir;
		this.packName = packName;
		this.xsdFile = xsdFile;
	}

	public void generateBindings() {
		String[] args = { "-d", packDir, "-p", packName, "-xmlschema", xsdFile };
		try {
			Driver.run(args, System.out, System.out);
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

}
